Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Key encapsulation mechanism</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Key_encapsulation_mechanism"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Key_encapsulation_mechanism rootpage-Key_encapsulation_mechanism skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Key encapsulation mechanism</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Key_wrap" title="Key wrap">key wrap</a>.</div>

<p>In <a href="Cryptography" title="Cryptography">cryptography</a>, a <b>key encapsulation mechanism</b> (<b>KEM</b>) is a <a href="Public-key_cryptography" title="Public-key cryptography">public-key cryptosystem</a> that allows a sender to generate a short secret key and transmit it to a receiver confidentially, in spite of <a href="Network_eavesdropping" title="Network eavesdropping">eavesdropping</a> and <a href="Man-in-the-middle_attack" title="Man-in-the-middle attack">intercepting</a> adversaries.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-0" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-0" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-0" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Modern standards for <a href="Public-key_encryption" class="mw-redirect" title="Public-key encryption">public-key encryption</a> of arbitrary messages are usually based on KEMs.<sup id="cite_ref-fips203_4-0" class="reference"><a href="#cite_note-fips203-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc9180_5-0" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>A KEM allows a sender who knows a public key to simultaneously generate a short random secret key and an <b>encapsulation</b> or <b>ciphertext</b> of the secret key by the KEM's <b>encapsulation algorithm</b>.
The receiver who knows the private key corresponding to the public key can recover the same random secret key from the encapsulation by the KEM's <b>decapsulation algorithm</b>.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-1" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-1" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-1" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>The security goal of a KEM is to prevent anyone who <i>does not</i> know the private key from recovering any information about the encapsulated secret keys, even after eavesdropping or submitting other encapsulations to the receiver to study how the receiver reacts.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-2" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-2" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-2" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Difference_from_public-key_encryption">Difference from public-key encryption</h2></div>

<p>The difference between a <a href="Public-key_encryption" class="mw-redirect" title="Public-key encryption">public-key encryption</a> scheme and a KEM is that a public-key encryption scheme allows a sender to choose an arbitrary message from some space of possible messages, while a KEM chooses a short secret key at random for the sender.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-3" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-3" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-3" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>The sender may take the random secret key produced by a KEM and use it as a <a href="Symmetric_key" class="mw-redirect" title="Symmetric key">symmetric key</a> for an <a href="Authenticated_encryption" title="Authenticated encryption">authenticated cipher</a> whose ciphertext is sent alongside the encapsulation to the receiver.
This serves to compose a public-key encryption scheme out of a KEM and a symmetric-key authenticated cipher in a <a href="Hybrid_cryptosystem" title="Hybrid cryptosystem">hybrid cryptosystem</a>.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-4" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-4" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-4" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc9180_5-1" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>Most public-key encryption schemes such as <a href="PKCS_1" title="PKCS 1">RSAES-PKCS1-v1_5</a>, <a href="Optimal_asymmetric_encryption_padding" title="Optimal asymmetric encryption padding">RSAES-OAEP</a>, and <a href="Elgamal_encryption" class="mw-redirect" title="Elgamal encryption">Elgamal encryption</a> are limited to small messages<sup id="cite_ref-rfc8017_6-0" class="reference"><a href="#cite_note-rfc8017-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-menezes-vanoorschoot-vanstone1996hac_7-0" class="reference"><a href="#cite_note-menezes-vanoorschoot-vanstone1996hac-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> and are almost always used to encrypt a short random secret key in a hybrid cryptosystem anyway.<sup id="cite_ref-ferguson-kohno-schneier2010cryptoengineering_8-0" class="reference"><a href="#cite_note-ferguson-kohno-schneier2010cryptoengineering-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc4880_9-0" class="reference"><a href="#cite_note-rfc4880-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc9180_5-2" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
And although a public-key encryption scheme can conversely be converted to a KEM by choosing a random secret key and encrypting it as a message, it is easier to design and analyze a secure KEM than to design a secure public-key encryption scheme as a basis.
So most modern public-key encryption schemes are based on KEMs rather than the other way around.<sup id="cite_ref-nist-pqc-faqs_10-0" class="reference"><a href="#cite_note-nist-pqc-faqs-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc9180_5-3" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Syntax">Syntax</h3></div>
<p>A KEM consists of three algorithms:<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-5" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-5" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-5" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dent2002designerkem_11-0" class="reference"><a href="#cite_note-dent2002designerkem-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-0" class="reference"><a href="#cite_note-hofheinz-hövelmanns-kiltz2017modularfo-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p>
<ol><li><b>Key generation</b>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Gen</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}</annotation>
</semantics>
</math></span><img src="./bd8c9b5bedd069cd789c297c5b5d41b103e2a310.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.825ex; height:2.843ex;" alt="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}" loading="lazy"></span>, takes no inputs and returns a pair of a public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}}</annotation>
</semantics>
</math></span><img src="./c74105ac9a9612666b04c1c00054aea52005de98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-right: -0.088ex; width:2.346ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}}" loading="lazy"></span> and a private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}}</annotation>
</semantics>
</math></span><img src="./49d12ff5920ef53458670d03c4bddd6149ba1668.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; margin-right: -0.088ex; width:2.109ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}}" loading="lazy"></span>.</li>
<li><b>Encapsulation</b>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./97dffd1729f2fde6f7db7e6801f076fa1549e189.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.236ex; height:2.843ex;" alt="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span>, takes a public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}}</annotation>
</semantics>
</math></span><img src="./c74105ac9a9612666b04c1c00054aea52005de98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-right: -0.088ex; width:2.346ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}}" loading="lazy"></span>, randomly chooses a secret key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span>, and returns <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> along with its encapsulation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span>.</li>
<li><b>Decapsulation</b>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./a52f9a280661946e980d640ad3546137b90b564c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.492ex; height:3.009ex;" alt="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span>, takes a private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}}</annotation>
</semantics>
</math></span><img src="./49d12ff5920ef53458670d03c4bddd6149ba1668.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; margin-right: -0.088ex; width:2.109ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}}" loading="lazy"></span> and an encapsulation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span>, and either returns an encapsulated secret key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k'}</annotation>
</semantics>
</math></span><img src="./51a2b832ed184c7b6481b3926bf8172d353fa7de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.896ex; height:2.509ex;" alt="{\displaystyle k'}" loading="lazy"></span> or fails, sometimes denoted by returning <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \bot }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">⊥<!-- ⊥ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \bot }</annotation>
</semantics>
</math></span><img src="./f282c7bc331cc3bfcf1c57f1452cc23c022f58de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.808ex; height:2.176ex;" alt="{\displaystyle \bot }" loading="lazy"></span> (called ‘<a href="Up_tack" title="Up tack">bottom</a>’).</li></ol>
<p>In the <a href="Asymptotic_analysis" title="Asymptotic analysis">asymptotic setting</a> of theoretical cryptography, the algorithms are all <a href="Probabilistic_polynomial-time" class="mw-redirect" title="Probabilistic polynomial-time">probabilistic polynomial-time</a> in a security parameter <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>λ<!-- λ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda }</annotation>
</semantics>
</math></span><img src="./b43d0ea3c9c025af1be9128e62a18fa74bedda2a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.355ex; height:2.176ex;" alt="{\displaystyle \lambda }" loading="lazy"></span>, and the length of the secret key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> is a function of the security parameter <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>λ<!-- λ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda }</annotation>
</semantics>
</math></span><img src="./b43d0ea3c9c025af1be9128e62a18fa74bedda2a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.355ex; height:2.176ex;" alt="{\displaystyle \lambda }" loading="lazy"></span>.<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-6" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-6" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>In practical cryptography, the secret key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> is usually of a fixed length for each algorithm.
For example, <a href="ML-KEM" class="mw-redirect" title="ML-KEM">ML-KEM</a> always uses 256-bit secret keys,<sup id="cite_ref-fips203_4-1" class="reference"><a href="#cite_note-fips203-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 3.3, p. 16">: § 3.3, p. 16 </span></sup> while the algorithms in <style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><a href="RFC_(identifier)" class="mw-redirect" title="RFC (identifier)">RFC</a>&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc9180">9180</a> vary between 256-, 384-, and 512-bit secret keys;<sup id="cite_ref-rfc9180_5-4" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 7.1">: § 7.1 </span></sup> secret keys of arbitrary length can be derived from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> by a <a href="Key_derivation_function" title="Key derivation function">key derivation function</a>.<sup id="cite_ref-NIST.SP.800-227_13-0" class="reference"><a href="#cite_note-NIST.SP.800-227-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 5.3">: § 5.3 </span></sup><sup id="cite_ref-rfc9180_5-5" class="reference"><a href="#cite_note-rfc9180-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Explicit_vs._implicit_rejection">Explicit <i>vs.</i> implicit rejection</h4></div>
<p>Decapsulation can fail because its input <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> is not an encapsulation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> returned by Encap, but has been tampered with or maliciously crafted.
KEMs which report failure by a distinguished symbol <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \bot }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">⊥<!-- ⊥ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \bot }</annotation>
</semantics>
</math></span><img src="./f282c7bc331cc3bfcf1c57f1452cc23c022f58de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.808ex; height:2.176ex;" alt="{\displaystyle \bot }" loading="lazy"></span> (implemented in practice by returning an error code or raising an exception) are said to use <b>explicit rejection</b>.
A KEM may instead return a random secret key in this event, or a secret key derived <a href="Pseudorandom_function_family" title="Pseudorandom function family">pseudorandomly</a> from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> under the key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle sk}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>s</mi>
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle sk}</annotation>
</semantics>
</math></span><img src="./6460cb8e220465e748ae56d01e5ee1126a44fef4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.302ex; height:2.176ex;" alt="{\displaystyle sk}" loading="lazy"></span>; this is called <b>implicit rejection</b>.<sup id="cite_ref-Persichetti2012thesis_14-0" class="reference"><a href="#cite_note-Persichetti2012thesis-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 5.3, pp. 76–78">: § 5.3, pp. 76–78 </span></sup><sup id="cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-1" class="reference"><a href="#cite_note-hofheinz-hövelmanns-kiltz2017modularfo-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Correctness">Correctness</h3></div>
<p>A KEM is <b>correct</b> if, for any key pair <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ({\mathit {pk}},{\mathit {sk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ({\mathit {pk}},{\mathit {sk}})}</annotation>
</semantics>
</math></span><img src="./7d8fec5d86fad3c81a34b3c281a8f039b149fcfe.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.121ex; height:2.843ex;" alt="{\displaystyle ({\mathit {pk}},{\mathit {sk}})}" loading="lazy"></span> generated by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Gen} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Gen</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Gen} }</annotation>
</semantics>
</math></span><img src="./1303d48213dd7e765bdafac997406d751bf3feea.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.149ex; height:2.176ex;" alt="{\displaystyle \operatorname {Gen} }" loading="lazy"></span>, decapsulating an encapsulation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> returned by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./97dffd1729f2fde6f7db7e6801f076fa1549e189.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.236ex; height:2.843ex;" alt="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span> with high probability yields the same key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span>, that is, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c)=k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Decap} ({\mathit {sk}},c)=k}</annotation>
</semantics>
</math></span><img src="./0385ee3e5068932c9f100799092be4f8b0379c04.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.476ex; height:2.843ex;" alt="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c)=k}" loading="lazy"></span>.<sup id="cite_ref-shoup2000hashhedgecca_2-7" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-6" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dent2002designerkem_11-1" class="reference"><a href="#cite_note-dent2002designerkem-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-2" class="reference"><a href="#cite_note-hofheinz-hövelmanns-kiltz2017modularfo-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Security:_IND-CCA">Security: IND-CCA</h3></div>
<p><b>Security</b> of a KEM is quantified by its <a href="Ciphertext_indistinguishability" title="Ciphertext indistinguishability">indistinguishability against adaptive chosen-ciphertext attack</a>, IND-CCA, which is loosely how much better an adversary can do than a coin toss to tell whether, given a random key and an encapsulation, the key is encapsulated by that encapsulation or is an independent random key.<sup id="cite_ref-shoup2000hashhedgecca_2-8" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-cramer-shoup2003pkecca_3-7" class="reference"><a href="#cite_note-cramer-shoup2003pkecca-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dent2002designerkem_11-2" class="reference"><a href="#cite_note-dent2002designerkem-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-3" class="reference"><a href="#cite_note-hofheinz-hövelmanns-kiltz2017modularfo-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-7" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>Specifically, in the IND-CCA game:
</p>
<ol><li>The key generation algorithm is run to generate <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Gen</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}</annotation>
</semantics>
</math></span><img src="./bd8c9b5bedd069cd789c297c5b5d41b103e2a310.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.825ex; height:2.843ex;" alt="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}" loading="lazy"></span>.</li>
<li><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}}</annotation>
</semantics>
</math></span><img src="./c74105ac9a9612666b04c1c00054aea52005de98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-right: -0.088ex; width:2.346ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}}" loading="lazy"></span> is revealed to the adversary.</li>
<li>The adversary can query <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./0f26c2b7fea9f2616ad0bad0ef005f0a027a763b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.851ex; height:3.009ex;" alt="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span> for arbitrary encapsulations <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> of the adversary's choice.</li>
<li>The encapsulation algorithm is run to randomly generate a secret key and encapsulation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k_{0},c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k_{0},c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./92e1e655ede537f93f4b9f3fe2877a82faf9e1e1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.29ex; height:2.843ex;" alt="{\displaystyle (k_{0},c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span>, and another secret key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k_{1}}</annotation>
</semantics>
</math></span><img src="./376315fd4983f01dada5ec2f7bebc48455b14a66.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.265ex; height:2.509ex;" alt="{\displaystyle k_{1}}" loading="lazy"></span> is generated independently at random.</li>
<li>A fair coin is tossed, giving an outcome <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b\in \{0,1\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
<mo>∈<!-- ∈ --></mo>
<mo fence="false" stretchy="false">{</mo>
<mn>0</mn>
<mo>,</mo>
<mn>1</mn>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b\in \{0,1\}}</annotation>
</semantics>
</math></span><img src="./b250aa33a7d342ab8b242e87ec4690bd0b5b8dd6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.522ex; height:2.843ex;" alt="{\displaystyle b\in \{0,1\}}" loading="lazy"></span>.</li>
<li>The pair <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k_{b},c)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
</mrow>
</msub>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k_{b},c)}</annotation>
</semantics>
</math></span><img src="./e57f9e03962ee9370a59c65b73484e97450f887c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.999ex; height:2.843ex;" alt="{\displaystyle (k_{b},c)}" loading="lazy"></span> is revealed to the adversary.</li>
<li>The adversary can again query <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./0f26c2b7fea9f2616ad0bad0ef005f0a027a763b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.851ex; height:3.009ex;" alt="{\displaystyle \operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span> for arbitrary encapsulations <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> of the adversary's choice, <i>except</i> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span>.</li>
<li>The adversary returns a guess <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b'\in \{0,1\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>b</mi>
<mo>′</mo>
</msup>
<mo>∈<!-- ∈ --></mo>
<mo fence="false" stretchy="false">{</mo>
<mn>0</mn>
<mo>,</mo>
<mn>1</mn>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b'\in \{0,1\}}</annotation>
</semantics>
</math></span><img src="./9b8091db74767a70de2dce6505357f11e6873692.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.207ex; height:3.009ex;" alt="{\displaystyle b'\in \{0,1\}}" loading="lazy"></span>, and wins the game if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b=b'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
<mo>=</mo>
<msup>
<mi>b</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b=b'}</annotation>
</semantics>
</math></span><img src="./958ee5aa7439f8f632ce3f87359ba99b1bf379b6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.778ex; height:2.509ex;" alt="{\displaystyle b=b'}" loading="lazy"></span>.</li></ol>
<p>The <b>IND-CCA advantage</b> of the adversary is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left|\Pr[b'=b]-1/2\right|}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow>
<mo>|</mo>
<mrow>
<mo movablelimits="true" form="prefix">Pr</mo>
<mo stretchy="false">[</mo>
<msup>
<mi>b</mi>
<mo>′</mo>
</msup>
<mo>=</mo>
<mi>b</mi>
<mo stretchy="false">]</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
</mrow>
<mo>|</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \left|\Pr[b'=b]-1/2\right|}</annotation>
</semantics>
</math></span><img src="./f6bca587c4ff5305de69acbb9ae92751cbb59a26.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.188ex; height:3.009ex;" alt="{\displaystyle \left|\Pr[b'=b]-1/2\right|}" loading="lazy"></span>, that is, the probability beyond a fair coin toss at correctly distinguishing an encapsulated key from an independently randomly chosen key.
</p>
<div class="mw-heading mw-heading2"><h2 id="Applications">Applications</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Public-key_encryption">Public-key encryption</h3></div>
<p>A key encapsulation mechanism can be used together with an <a href="Authenticated_encryption" title="Authenticated encryption">authenticated</a> <a href="Symmetric-key_cryptography" class="mw-redirect" title="Symmetric-key cryptography">symmetric cipher</a> to construct a <a href="Public-key_encryption" class="mw-redirect" title="Public-key encryption">public-key encryption</a> scheme for arbitrary messages.
The security requirement for the symmetric cipher, called a <b>data encapsulation mechanism</b> or <b>DEM</b>, is <a href="Ciphertext_indistinguishability" title="Ciphertext indistinguishability">indistinguishability against chosen-ciphertext attack</a> for a <i>single</i> message encrypted by the sender.<sup id="cite_ref-shoup2001isoproposal_15-0" class="reference"><a href="#cite_note-shoup2001isoproposal-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dent2002designerkem_11-3" class="reference"><a href="#cite_note-dent2002designerkem-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rfc9690_16-0" class="reference"><a href="#cite_note-rfc9690-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p><p>Given a secure KEM with algorithms Gen/Encap/Decap, and a secure DEM <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle E_{k}(m)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>m</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle E_{k}(m)}</annotation>
</semantics>
</math></span><img src="./d75ae2b4724f38e3328f261a21f59719cd321dcd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.654ex; height:2.843ex;" alt="{\displaystyle E_{k}(m)}" loading="lazy"></span>, the following <a href="Hybrid_cryptosystem" title="Hybrid cryptosystem">hybrid public-key encryption scheme</a> is also secure against adaptive chosen-ciphertext attack in the public-key setting:<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-8" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-shoup2000hashhedgecca_2-9" class="reference"><a href="#cite_note-shoup2000hashhedgecca-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 7.2, Theorem 7.3">: § 7.2, Theorem 7.3 </span></sup><sup id="cite_ref-NIST.SP.800-227_13-1" class="reference"><a href="#cite_note-NIST.SP.800-227-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: § 6.2.1">: § 6.2.1 </span></sup>
</p>
<ul><li>Key generation: Same as the KEM.</li>
<li>To encrypt a message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> for a public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}}</annotation>
</semantics>
</math></span><img src="./c74105ac9a9612666b04c1c00054aea52005de98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-right: -0.088ex; width:2.346ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}}" loading="lazy"></span>:
<ol><li>Let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./97dffd1729f2fde6f7db7e6801f076fa1549e189.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.236ex; height:2.843ex;" alt="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span>.</li>
<li>Let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma :=E_{k}(m)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>σ<!-- σ --></mi>
<mo>:=</mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>m</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sigma :=E_{k}(m)}</annotation>
</semantics>
</math></span><img src="./fb5475009b1d2d6b5459089887138da50aff9a0a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.729ex; height:2.843ex;" alt="{\displaystyle \sigma :=E_{k}(m)}" loading="lazy"></span>.</li>
<li>Send <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (c,\sigma )}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo>,</mo>
<mi>σ<!-- σ --></mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (c,\sigma )}</annotation>
</semantics>
</math></span><img src="./74ec870f786f2ce758de07396380d01819b23f94.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.18ex; height:2.843ex;" alt="{\displaystyle (c,\sigma )}" loading="lazy"></span> as the ciphertext.</li></ol></li>
<li>To decrypt a ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (c',\sigma ')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo>,</mo>
<msup>
<mi>σ<!-- σ --></mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (c',\sigma ')}</annotation>
</semantics>
</math></span><img src="./81ff19bc0ec768b9edfebe6533a04d1508084f94.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.55ex; height:3.009ex;" alt="{\displaystyle (c',\sigma ')}" loading="lazy"></span> with private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}}</annotation>
</semantics>
</math></span><img src="./49d12ff5920ef53458670d03c4bddd6149ba1668.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; margin-right: -0.088ex; width:2.109ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}}" loading="lazy"></span>:
<ol><li>Let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./a52f9a280661946e980d640ad3546137b90b564c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.492ex; height:3.009ex;" alt="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span>, or fail if it fails.</li>
<li>Return the message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle E_{k'}^{-1}(\sigma ')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msubsup>
<mo stretchy="false">(</mo>
<msup>
<mi>σ<!-- σ --></mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle E_{k'}^{-1}(\sigma ')}</annotation>
</semantics>
</math></span><img src="./a8b168707677eb6c4178121b7063a853fe6e88dc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.338ex; width:7.951ex; height:3.676ex;" alt="{\displaystyle E_{k'}^{-1}(\sigma ')}" loading="lazy"></span>, or fail if it fails.</li></ol></li></ul>
<p>Note that—as with any public-key encryption on its own—this does not authenticate the sender: anyone with the public key can send a message to a recipient with the private key.
Other cryptography, such as <a href="Digital_signatures" class="mw-redirect" title="Digital signatures">digital signatures</a>, must be used in a protocol for a sender to prove its identity to the receiver.<sup id="cite_ref-an2001pkae_17-0" class="reference"><a href="#cite_note-an2001pkae-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</p><p>The use of an <i>authenticated</i> symmetric cipher is nevertheless required in this <i>anonymous</i> public-key encryption scheme to meet IND-CCA security.
If an <i>unauthenticated</i> cipher were used, secure only against chosen-plaintext attack (IND-CPA), an adversary could <a href="Malleability_(cryptography)" title="Malleability (cryptography)">selectively modify</a> a message through its ciphertext in transit, which not only fails IND-CCA on a technicality<sup id="cite_ref-BDPR1998pkesecrelations_18-0" class="reference"><a href="#cite_note-BDPR1998pkesecrelations-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> but also can compromise confidentiality in practice as in <a href="EFAIL" title="EFAIL">EFAIL</a>.<sup id="cite_ref-2018EFAIL_19-0" class="reference"><a href="#cite_note-2018EFAIL-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Key_agreement_protocols">Key agreement protocols</h3></div>
<p>A KEM can also be used in an <a href="Authenticated_key_agreement" class="mw-redirect" title="Authenticated key agreement">authenticated key agreement</a> protocol such as <a href="Transport_Layer_Security" title="Transport Layer Security">TLS</a> with <a href="Forward_secrecy" title="Forward secrecy">forward secrecy</a> for an online session, by having the client and server generate KEM key pairs and exchange signed encapsulations using those key pairs, which they then erase at the end of the session.<sup id="cite_ref-NIST.SP.800-227_13-2" class="reference"><a href="#cite_note-NIST.SP.800-227-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Combining_KEMs">Combining KEMs</h3></div>
<p>Different KEMs rely on different mathematical problems for their security.
For example, the security of Rabin-KEM relies on the difficulty of <a href="Integer_factorization" title="Integer factorization">integer factorization</a><sup id="cite_ref-dent2002designerkem_11-4" class="reference"><a href="#cite_note-dent2002designerkem-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>, which has been studied for centuries, but is known to be vulnerable to quantum computers capable of running <a href="Shor's_algorithm" title="Shor's algorithm">Shor's algorithm</a>.
In contrast, the security of <a href="ML-KEM" class="mw-redirect" title="ML-KEM">ML-KEM</a> relies on the difficulty of <a href="Learning_with_errors" title="Learning with errors">learning with errors</a>,<sup id="cite_ref-fips203_4-2" class="reference"><a href="#cite_note-fips203-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> which has only been studied for decades, but is not known to be vulnerable even to an adversary with a Shor-capable quantum computer.
</p><p>A <b>KEM combiner</b> is a scheme for combining two KEMs, KEM<sub>1</sub> and KEM<sub>2</sub> with respective encapsulation algorithms KEM<sub>1</sub>.Encap and KEM<sub>2</sub>.Encap and so on, into a combined KEM which is secure if <i>either</i> KEM<sub>1</sub> <i>or</i> KEM<sub>2</sub> is secure.<sup id="cite_ref-Giacon-Hauer-Poettering2018kemcombiners_20-0" class="reference"><a href="#cite_note-Giacon-Hauer-Poettering2018kemcombiners-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p><p>A KEM that combines a quantum-vulnerable KEM such as DH-KEM using <a href="X25519" class="mw-redirect" title="X25519">X25519</a> with a <a href="Post-quantum_cryptography" title="Post-quantum cryptography">post-quantum</a> KEM such as <a href="ML-KEM" class="mw-redirect" title="ML-KEM">ML-KEM</a> is sometimes called a <a href="Post-quantum_cryptography#Hybrid_encryption" title="Post-quantum cryptography"><b>hybrid</b></a>,<sup id="cite_ref-10.1007_978-3-030-25510-7_21-0" class="reference"><a href="#cite_note-10.1007_978-3-030-25510-7-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-nist-pqc-faqs_10-1" class="reference"><a href="#cite_note-nist-pqc-faqs-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ETSI_TS_103_744_V1.1.1_22-0" class="reference"><a href="#cite_note-ETSI_TS_103_744_V1.1.1-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> not to be confused with a <a href="Hybrid_cryptosystem" title="Hybrid cryptosystem">hybrid cryptosystem</a> which combines <a href="Public-key_cryptography" title="Public-key cryptography">public-key cryptography</a> with <a href="Symmetric-key_cryptography" class="mw-redirect" title="Symmetric-key cryptography">symmetric-key cryptography</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples_and_motivation">Examples and motivation</h2></div>
<div class="mw-heading mw-heading3"><h3 id="RSA">RSA</h3></div>
<p>Traditional <a href="RSA_encryption" class="mw-redirect" title="RSA encryption">RSA encryption</a>, with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span>-bit moduli and exponent <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle e}</annotation>
</semantics>
</math></span><img src="./cd253103f0876afc68ebead27a5aa9867d927467.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle e}" loading="lazy"></span>, is defined as follows:<sup id="cite_ref-aumasson2018seriouscrypto_23-0" class="reference"><a href="#cite_note-aumasson2018seriouscrypto-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-stinson2006cryptotheorypracticebook_24-0" class="reference"><a href="#cite_note-stinson2006cryptotheorypracticebook-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rsa1978method_25-0" class="reference"><a href="#cite_note-rsa1978method-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><b>Key generation</b>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Gen</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}</annotation>
</semantics>
</math></span><img src="./bd8c9b5bedd069cd789c297c5b5d41b103e2a310.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.825ex; height:2.843ex;" alt="{\displaystyle ({\mathit {pk}},{\mathit {sk}}):=\operatorname {Gen} ()}" loading="lazy"></span>:</li></ul>
<ol><li>Generate a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span>-bit <a href="Semiprime" title="Semiprime">semiprime</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n}</annotation>
</semantics>
</math></span><img src="./a601995d55609f2d9f5e233e36fbe9ea26011b3b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{t-1}<n<2^{t}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<mo>&lt;</mo>
<mi>n</mi>
<mo>&lt;</mo>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{t-1}&lt;n&lt;2^{t}}</annotation>
</semantics>
</math></span><img src="./f33181a3fae3e310b0af946669f5a09f2949df12.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:13.669ex; height:2.676ex;" alt="{\displaystyle 2^{t-1}<n<2^{t}}" loading="lazy"></span> at random satisfying <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \gcd(e,\lambda (n))=1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo movablelimits="true" form="prefix">gcd</mo>
<mo stretchy="false">(</mo>
<mi>e</mi>
<mo>,</mo>
<mi>λ<!-- λ --></mi>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \gcd(e,\lambda (n))=1}</annotation>
</semantics>
</math></span><img src="./98035e380c29b12488970d40b18842505fab797b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.234ex; height:2.843ex;" alt="{\displaystyle \gcd(e,\lambda (n))=1}" loading="lazy"></span>, where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda (n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>λ<!-- λ --></mi>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda (n)}</annotation>
</semantics>
</math></span><img src="./8f06b26d7cb84392c1891a14c32c4dbe7e3f5e92.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.559ex; height:2.843ex;" alt="{\displaystyle \lambda (n)}" loading="lazy"></span> is the <a href="Carmichael_function" title="Carmichael function">Carmichael function</a>.</li>
<li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d:=e^{-1}{\bmod {\lambda }}(n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
<mo>:=</mo>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>λ<!-- λ --></mi>
</mrow>
</mrow>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d:=e^{-1}{\bmod {\lambda }}(n)}</annotation>
</semantics>
</math></span><img src="./28a5d72c094cedbcc56629168d43456f32a3ed34.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.618ex; height:3.176ex;" alt="{\displaystyle d:=e^{-1}{\bmod {\lambda }}(n)}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}:=n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>:=</mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}:=n}</annotation>
</semantics>
</math></span><img src="./fb5cae58278d26d35ff57b48d732cc1317e52b26.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.398ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}:=n}" loading="lazy"></span> as the public key and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}:=(n,d)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>,</mo>
<mi>d</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}:=(n,d)}</annotation>
</semantics>
</math></span><img src="./0d8480255dc660330c315947f14350aacaca27fd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.22ex; height:2.843ex;" alt="{\displaystyle {\mathit {sk}}:=(n,d)}" loading="lazy"></span> as the private key. (Many variations on key generation algorithms and private key formats are available.<sup id="cite_ref-svenda2016mkq_26-0" class="reference"><a href="#cite_note-svenda2016mkq-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup>)</li></ol>
<ul><li><b>Encryption</b> of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (t-1)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>t</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (t-1)}</annotation>
</semantics>
</math></span><img src="./1d822b730c9fa7342d2557b5a35e9e36b38efbd3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.652ex; height:2.843ex;" alt="{\displaystyle (t-1)}" loading="lazy"></span>-bit message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> to public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}=n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}=n}</annotation>
</semantics>
</math></span><img src="./419b21283eaea2e0d806285d09831c4ff1bbca7b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.751ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}=n}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<mi>Encrypt</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mi>m</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}</annotation>
</semantics>
</math></span><img src="./acba1309d5336b8332452c3606b0341a74750802.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.137ex; height:2.843ex;" alt="{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}" loading="lazy"></span>:</li></ul>
<ol><li>Encode the bit string <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> as an integer <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r}</annotation>
</semantics>
</math></span><img src="./0d1ecb613aa2984f0576f70f86650b7c2a132538.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.049ex; height:1.676ex;" alt="{\displaystyle r}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq r<n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>r</mi>
<mo>&lt;</mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0\leq r&lt;n}</annotation>
</semantics>
</math></span><img src="./7ba223befaf10cf81c9d56afef11b52ab73f81c9.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.803ex; height:2.343ex;" alt="{\displaystyle 0\leq r<n}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=r^{e}{\bmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>e</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=r^{e}{\bmod {n}}}</annotation>
</semantics>
</math></span><img src="./1e0232243688f96e5ad87690961b2162434035b1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:13.875ex; height:2.343ex;" alt="{\displaystyle c:=r^{e}{\bmod {n}}}" loading="lazy"></span>.</li></ol>
<ul><li><b>Decryption</b> of ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> with private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}=(n,d)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>,</mo>
<mi>d</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}=(n,d)}</annotation>
</semantics>
</math></span><img src="./c0df04bb29a3e6e13f5df0eb45ca44aec498a0e0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.573ex; height:2.843ex;" alt="{\displaystyle {\mathit {sk}}=(n,d)}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decrypt</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./3ec6570c8ffbbddb6f6b779b83f4554d82a79217.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.203ex; height:3.009ex;" alt="{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}" loading="lazy"></span>:</li></ul>
<ol><li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r':=(c')^{d}{\bmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>r</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>d</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r':=(c')^{d}{\bmod {n}}}</annotation>
</semantics>
</math></span><img src="./4e8c1e6dac48cbeef26c7e58c90347b573fc70a7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.147ex; height:3.176ex;" alt="{\displaystyle r':=(c')^{d}{\bmod {n}}}" loading="lazy"></span>.</li>
<li>Decode the integer <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>r</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r'}</annotation>
</semantics>
</math></span><img src="./20f4d06078c3550f2cd0812005ba6301d12cc4c0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.733ex; height:2.509ex;" alt="{\displaystyle r'}" loading="lazy"></span> as a bit string <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m'}</annotation>
</semantics>
</math></span><img src="./b2ea8347f7588b19652c2098395f059d76b12b60.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.725ex; height:2.509ex;" alt="{\displaystyle m'}" loading="lazy"></span>.</li></ol>
<p>This naive approach is totally insecure.
For example, since it is nonrandomized, it cannot be secure against even <a href="Known-plaintext_attack" title="Known-plaintext attack">known-plaintext attack</a>—an adversary can tell whether the sender is sending the message <code>ATTACK AT DAWN</code> versus the message <code>ATTACK AT DUSK</code> simply by encrypting those messages and comparing the ciphertext.
</p><p>Even if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> is always a random secret key, such as a 256-bit <a href="Advanced_Encryption_Standard" title="Advanced Encryption Standard">AES</a> key, when <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>e</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle e}</annotation>
</semantics>
</math></span><img src="./cd253103f0876afc68ebead27a5aa9867d927467.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle e}" loading="lazy"></span> is chosen to optimize efficiency as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e=3}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>e</mi>
<mo>=</mo>
<mn>3</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle e=3}</annotation>
</semantics>
</math></span><img src="./2971339e7da12fa59af242d68484fa34b181342d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.344ex; height:2.176ex;" alt="{\displaystyle e=3}" loading="lazy"></span>, the message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> can be computed from the ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> simply by taking real number cube roots, and there are many other <a href="RSA_(cryptosystem)" class="mw-redirect" title="RSA (cryptosystem)">attacks against plain RSA</a>.<sup id="cite_ref-aumasson2018seriouscrypto_23-1" class="reference"><a href="#cite_note-aumasson2018seriouscrypto-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-stinson2006cryptotheorypracticebook_24-1" class="reference"><a href="#cite_note-stinson2006cryptotheorypracticebook-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
Various <a href="RSA_(cryptosystem)" class="mw-redirect" title="RSA (cryptosystem)">randomized padding schemes</a> have been devised in attempts—sometimes failed, like <a href="PKCS_1" title="PKCS 1">RSAES-PKCS1-v1_5</a><sup id="cite_ref-aumasson2018seriouscrypto_23-2" class="reference"><a href="#cite_note-aumasson2018seriouscrypto-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-bleichenbacher1998pkcs1cca_27-0" class="reference"><a href="#cite_note-bleichenbacher1998pkcs1cca-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-coron-joye-naccache-paillier2000newpkcs1attacks_28-0" class="reference"><a href="#cite_note-coron-joye-naccache-paillier2000newpkcs1attacks-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup>—to make it secure for arbitrary short messages <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span>.<sup id="cite_ref-aumasson2018seriouscrypto_23-3" class="reference"><a href="#cite_note-aumasson2018seriouscrypto-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-stinson2006cryptotheorypracticebook_24-2" class="reference"><a href="#cite_note-stinson2006cryptotheorypracticebook-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</p><p>Since the message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> is almost always a short secret key for a <a href="Symmetric-key" class="mw-redirect" title="Symmetric-key">symmetric-key</a> <a href="Authenticated_encryption" title="Authenticated encryption">authenticated cipher</a> used to encrypt an arbitrary bit string message, a simpler approach called <b>RSA-KEM</b> is to choose an element of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} /n\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>n</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} /n\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./f2120ebbc85f91df66c6de5446367bf9fd620844.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.658ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} /n\mathbb {Z} }" loading="lazy"></span> at random and use that to <i>derive</i> a secret key using a <a href="Key_derivation_function" title="Key derivation function">key derivation function</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>H</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle H}</annotation>
</semantics>
</math></span><img src="./75a9edddcca2f782014371f75dca39d7e13a9c1b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.064ex; height:2.176ex;" alt="{\displaystyle H}" loading="lazy"></span>, roughly as follows:<sup id="cite_ref-shoup2001isoproposal_15-1" class="reference"><a href="#cite_note-shoup2001isoproposal-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ferguson-kohno-schneier2010cryptoengineering_8-1" class="reference"><a href="#cite_note-ferguson-kohno-schneier2010cryptoengineering-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><b>Key generation</b>: As above.</li>
<li><b>Encapsulation</b> for a public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}=n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}=n}</annotation>
</semantics>
</math></span><img src="./419b21283eaea2e0d806285d09831c4ff1bbca7b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.751ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}=n}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./97dffd1729f2fde6f7db7e6801f076fa1549e189.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.236ex; height:2.843ex;" alt="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span>:</li></ul>
<ol><li>Choose an integer <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r}</annotation>
</semantics>
</math></span><img src="./0d1ecb613aa2984f0576f70f86650b7c2a132538.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.049ex; height:1.676ex;" alt="{\displaystyle r}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq r<n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>r</mi>
<mo>&lt;</mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0\leq r&lt;n}</annotation>
</semantics>
</math></span><img src="./7ba223befaf10cf81c9d56afef11b52ab73f81c9.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.803ex; height:2.343ex;" alt="{\displaystyle 0\leq r<n}" loading="lazy"></span> uniformly at random.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k:=H(r)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>:=</mo>
<mi>H</mi>
<mo stretchy="false">(</mo>
<mi>r</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k:=H(r)}</annotation>
</semantics>
</math></span><img src="./89c91b7600e6a520180bed66392442787de51555.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.878ex; height:2.843ex;" alt="{\displaystyle k:=H(r)}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=r^{e}{\bmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>e</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=r^{e}{\bmod {n}}}</annotation>
</semantics>
</math></span><img src="./1e0232243688f96e5ad87690961b2162434035b1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:13.875ex; height:2.343ex;" alt="{\displaystyle c:=r^{e}{\bmod {n}}}" loading="lazy"></span> as its encapsulation.</li></ol>
<ul><li><b>Decapsulation</b> of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> with private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}=(n,d)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>,</mo>
<mi>d</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}=(n,d)}</annotation>
</semantics>
</math></span><img src="./c0df04bb29a3e6e13f5df0eb45ca44aec498a0e0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.573ex; height:2.843ex;" alt="{\displaystyle {\mathit {sk}}=(n,d)}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./a52f9a280661946e980d640ad3546137b90b564c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.492ex; height:3.009ex;" alt="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span>:</li></ul>
<ol><li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r':=(c')^{d}{\bmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>r</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>d</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r':=(c')^{d}{\bmod {n}}}</annotation>
</semantics>
</math></span><img src="./4e8c1e6dac48cbeef26c7e58c90347b573fc70a7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.147ex; height:3.176ex;" alt="{\displaystyle r':=(c')^{d}{\bmod {n}}}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=H(r')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>H</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=H(r')}</annotation>
</semantics>
</math></span><img src="./40a956efc5100e87887b3791e120967c859519d7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.248ex; height:3.009ex;" alt="{\displaystyle k':=H(r')}" loading="lazy"></span>.</li></ol>
<p>This approach is simpler to implement, and provides a tighter reduction to the <a href="RSA_problem" title="RSA problem">RSA problem</a>, than padding schemes like <a href="Optimal_asymmetric_encryption_padding" title="Optimal asymmetric encryption padding">RSAES-OAEP</a>.<sup id="cite_ref-shoup2001isoproposal_15-2" class="reference"><a href="#cite_note-shoup2001isoproposal-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Elgamal">Elgamal</h3></div>
<p>Traditional <a href="Elgamal_encryption" class="mw-redirect" title="Elgamal encryption">Elgamal encryption</a> is defined over a multiplicative subgroup of the finite field <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} /p\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} /p\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./57869a3a3c4c431cc49c4c7ab1d9c7ea692b517b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.433ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} /p\mathbb {Z} }" loading="lazy"></span> with generator <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>g</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g}</annotation>
</semantics>
</math></span><img src="./d3556280e66fe2c0d0140df20935a6f057381d77.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" loading="lazy"></span> of order <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q}</annotation>
</semantics>
</math></span><img src="./06809d64fa7c817ffc7e323f85997f783dbdf71d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.07ex; height:2.009ex;" alt="{\displaystyle q}" loading="lazy"></span> as follows:<sup id="cite_ref-galbraith2012mathpkcbook-elgamal_29-0" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-elgamal-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-elgamal1985pke_30-0" class="reference"><a href="#cite_note-elgamal1985pke-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><b>Key generation</b>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (pk,sk):=\operatorname {Gen} ()}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>p</mi>
<mi>k</mi>
<mo>,</mo>
<mi>s</mi>
<mi>k</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Gen</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (pk,sk):=\operatorname {Gen} ()}</annotation>
</semantics>
</math></span><img src="./f7bd1324e18d4275113c98a52963c8c5055cd628.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.229ex; height:2.843ex;" alt="{\displaystyle (pk,sk):=\operatorname {Gen} ()}" loading="lazy"></span>:</li></ul>
<ol><li>Choose <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x\in \mathbb {Z} /q\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x\in \mathbb {Z} /q\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./140640cbb0ffa24a2b6b92944118bd0d7a94417f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.503ex; height:2.843ex;" alt="{\displaystyle x\in \mathbb {Z} /q\mathbb {Z} }" loading="lazy"></span> uniformly at random.</li>
<li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y:=g^{x}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>y</mi>
<mo>:=</mo>
<msup>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle y:=g^{x}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./1ba9b3aa3b479fc369aec9ac1b6f9e2418c6ea99.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:14.042ex; height:2.676ex;" alt="{\displaystyle y:=g^{x}{\bmod {p}}}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}:=x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>:=</mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}:=x}</annotation>
</semantics>
</math></span><img src="./c375c4dcb47314079a5347820ddb9f5dc83d16da.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.096ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}:=x}" loading="lazy"></span> as the private key and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}:=y}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>:=</mo>
<mi>y</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}:=y}</annotation>
</semantics>
</math></span><img src="./0a0b986c72b856bfe16fad2a40c47edd66761a1e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.158ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}:=y}" loading="lazy"></span> as the public key.</li></ol>
<ul><li><b>Encryption</b> of a message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m\in \mathbb {Z} /p\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m\in \mathbb {Z} /p\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./3a45d398f5261fbba6fe1aa6c15fdf4533ced50f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.314ex; height:2.843ex;" alt="{\displaystyle m\in \mathbb {Z} /p\mathbb {Z} }" loading="lazy"></span> to public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}=y}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>y</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}=y}</annotation>
</semantics>
</math></span><img src="./154606adab86dc81f60ec28679b1f5aa30c6c29a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.512ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}=y}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<mi>Encrypt</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<mi>m</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}</annotation>
</semantics>
</math></span><img src="./acba1309d5336b8332452c3606b0341a74750802.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.137ex; height:2.843ex;" alt="{\displaystyle c:=\operatorname {Encrypt} ({\mathit {pk}},m)}" loading="lazy"></span>:</li></ul>
<ol><li>Choose <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./5ea4ad964bed4bd1fa9758edecc191199a4116cc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.222ex; height:2.843ex;" alt="{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }" loading="lazy"></span> uniformly at random.</li>
<li>Compute: <span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}t&amp;:=y^{r}{\bmod {p}}\\c_{1}&amp;:=g^{r}{\bmod {p}}\\c_{2}&amp;:=(t\cdot m){\bmod {p}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>t</mi>
</mtd>
<mtd>
<mi></mi>
<mo>:=</mo>
<msup>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mtd>
<mtd>
<mi></mi>
<mo>:=</mo>
<msup>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mtd>
<mtd>
<mi></mi>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<mi>t</mi>
<mo>⋅<!-- ⋅ --></mo>
<mi>m</mi>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}t&amp;:=y^{r}{\bmod {p}}\\c_{1}&amp;:=g^{r}{\bmod {p}}\\c_{2}&amp;:=(t\cdot m){\bmod {p}}\end{aligned}}}</annotation>
</semantics>
</math></span></span></li>
<li>Return the ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=(c_{1},c_{2})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=(c_{1},c_{2})}</annotation>
</semantics>
</math></span><img src="./3d7f7461d67a71d5e290eac1cf8882c480746629.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.718ex; height:2.843ex;" alt="{\displaystyle c:=(c_{1},c_{2})}" loading="lazy"></span>.</li></ol>
<ul><li><b>Decryption</b> of a ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'=(c'_{1},c'_{2})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mo>,</mo>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'=(c'_{1},c'_{2})}</annotation>
</semantics>
</math></span><img src="./c1ce574c5116fc2a5576ee6554db487c530a8a6a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:11.755ex; height:3.176ex;" alt="{\displaystyle c'=(c'_{1},c'_{2})}" loading="lazy"></span> for a private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}=x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}=x}</annotation>
</semantics>
</math></span><img src="./be6ad3ee52193b96a7fb624bafb5e84be678c236.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.449ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}=x}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decrypt</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./3ec6570c8ffbbddb6f6b779b83f4554d82a79217.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.203ex; height:3.009ex;" alt="{\displaystyle m':=\operatorname {Decrypt} ({\mathit {sk}},c')}" loading="lazy"></span>:</li></ul>
<ol><li>Fail and return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \bot }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">⊥<!-- ⊥ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \bot }</annotation>
</semantics>
</math></span><img src="./f282c7bc331cc3bfcf1c57f1452cc23c022f58de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.808ex; height:2.176ex;" alt="{\displaystyle \bot }" loading="lazy"></span> if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (c'_{1})^{(p-1)/q}\not \equiv 1{\pmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
</mrow>
</msup>
<mo>≢</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mi>p</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (c'_{1})^{(p-1)/q}\not \equiv 1{\pmod {p}}}</annotation>
</semantics>
</math></span><img src="./5b9fbace7f9f0f833261144e12b507bbf1394929.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:25.003ex; height:3.509ex;" alt="{\displaystyle (c'_{1})^{(p-1)/q}\not \equiv 1{\pmod {p}}}" loading="lazy"></span> or if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (c'_{2})^{(p-1)/q}\not \equiv 1{\pmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
</mrow>
</msup>
<mo>≢</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mi>p</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (c'_{2})^{(p-1)/q}\not \equiv 1{\pmod {p}}}</annotation>
</semantics>
</math></span><img src="./3b968ee605b7ac7f7af3d02897db11073a379fb6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:25.003ex; height:3.509ex;" alt="{\displaystyle (c'_{2})^{(p-1)/q}\not \equiv 1{\pmod {p}}}" loading="lazy"></span>, i.e., if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'_{1}}</annotation>
</semantics>
</math></span><img src="./cb6b9cd109a342a7283edb5e0bd729beedc3b804.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.061ex; height:2.843ex;" alt="{\displaystyle c'_{1}}" loading="lazy"></span> or <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'_{2}}</annotation>
</semantics>
</math></span><img src="./1989187655d3a06c355d467b92ec07b31438b949.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.061ex; height:2.843ex;" alt="{\displaystyle c'_{2}}" loading="lazy"></span> is not in the subgroup generated by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>g</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g}</annotation>
</semantics>
</math></span><img src="./d3556280e66fe2c0d0140df20935a6f057381d77.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" loading="lazy"></span>.</li>
<li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t':=(c'_{1})^{x}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>t</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t':=(c'_{1})^{x}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./3ff4780d4a63193cad769d84152f9b2d37d409d5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:17.163ex; height:3.176ex;" alt="{\displaystyle t':=(c'_{1})^{x}{\bmod {p}}}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m':=t^{-1}c'_{2}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<msup>
<mi>t</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m':=t^{-1}c'_{2}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./869ff76d3dbfcb655d6d1a459d3d804451530ca2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:18.555ex; height:3.343ex;" alt="{\displaystyle m':=t^{-1}c'_{2}{\bmod {p}}}" loading="lazy"></span>.</li></ol>
<p>This meets the syntax of a public-key encryption scheme, restricted to messages in the space <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} /p\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} /p\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./57869a3a3c4c431cc49c4c7ab1d9c7ea692b517b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.433ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} /p\mathbb {Z} }" loading="lazy"></span> (which limits it to message of a few hundred bytes for typical values of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p}</annotation>
</semantics>
</math></span><img src="./81eac1e205430d1f40810df36a0edffdc367af36.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:1.259ex; height:2.009ex;" alt="{\displaystyle p}" loading="lazy"></span>).
By validating ciphertexts in decryption, it avoids leaking bits of the private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span> through maliciously chosen ciphertexts outside the group generated by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>g</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g}</annotation>
</semantics>
</math></span><img src="./d3556280e66fe2c0d0140df20935a6f057381d77.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" loading="lazy"></span>.
</p><p>However, this fails to achieve <a href="Ciphertext_indistinguishability" title="Ciphertext indistinguishability">indistinguishability against chosen-ciphertext attack</a>.
For example, an adversary having a ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c=(c_{1},c_{2})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c=(c_{1},c_{2})}</annotation>
</semantics>
</math></span><img src="./5fc035910d550e0cb7f84d2061d7b844423e6239.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.071ex; height:2.843ex;" alt="{\displaystyle c=(c_{1},c_{2})}" loading="lazy"></span> for an unknown message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> can trivially decrypt it by querying the decryption oracle for the distinct ciphertext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c':=(c_{1},c_{2}g)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mi>g</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c':=(c_{1},c_{2}g)}</annotation>
</semantics>
</math></span><img src="./cda27d4a425e0b79f14a255b5719178e426ce898.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.518ex; height:3.009ex;" alt="{\displaystyle c':=(c_{1},c_{2}g)}" loading="lazy"></span>, yielding the related plaintext <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m':=mg{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>m</mi>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m':=mg{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./a5d74f1d10f23779af4188f46a8bbbafe04c799e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:16.477ex; height:2.843ex;" alt="{\displaystyle m':=mg{\bmod {p}}}" loading="lazy"></span>, from which <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> can be recovered by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m=m'g^{-1}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
<mo>=</mo>
<msup>
<mi>m</mi>
<mo>′</mo>
</msup>
<msup>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m=m'g^{-1}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./dbfc37c020a355c4f5c77570972e2f491a38215e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:18.166ex; height:3.009ex;" alt="{\displaystyle m=m'g^{-1}{\bmod {p}}}" loading="lazy"></span>.<sup id="cite_ref-galbraith2012mathpkcbook-elgamal_29-1" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-elgamal-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</p><p>Traditional Elgamal encryption can be adapted to the elliptic-curve setting, but it requires some way to reversibly encode messages as points on the curve, which is less trivial than encoding messages as integers mod <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p}</annotation>
</semantics>
</math></span><img src="./81eac1e205430d1f40810df36a0edffdc367af36.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:1.259ex; height:2.009ex;" alt="{\displaystyle p}" loading="lazy"></span>.<sup id="cite_ref-koblitz1987ecc_31-0" class="reference"><a href="#cite_note-koblitz1987ecc-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>
</p><p>Since the message <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> is almost always a short secret key for a <a href="Symmetric-key" class="mw-redirect" title="Symmetric-key">symmetric-key</a> <a href="Authenticated_encryption" title="Authenticated encryption">authenticated cipher</a> used to encrypt an arbitrary bit string message, a simpler approach is to <i>derive</i> the secret key from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span> and dispense with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>m</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m}</annotation>
</semantics>
</math></span><img src="./0a07d98bb302f3856cbabc47b2b9016692e3f7bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.04ex; height:1.676ex;" alt="{\displaystyle m}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c_{2}}</annotation>
</semantics>
</math></span><img src="./0b30ba1b247fb8d334580cec68561e749d24aff2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.061ex; height:2.009ex;" alt="{\displaystyle c_{2}}" loading="lazy"></span> altogether, as a KEM, using a <a href="Key_derivation_function" title="Key derivation function">key derivation function</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>H</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle H}</annotation>
</semantics>
</math></span><img src="./75a9edddcca2f782014371f75dca39d7e13a9c1b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.064ex; height:2.176ex;" alt="{\displaystyle H}" loading="lazy"></span>:<sup id="cite_ref-galbraith2012mathpkcbook-kemdem_1-9" class="reference"><a href="#cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><b>Key generation</b>: As above.</li>
<li><b>Encapsulation</b> for a public key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {pk}}=y}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>y</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {pk}}=y}</annotation>
</semantics>
</math></span><img src="./154606adab86dc81f60ec28679b1f5aa30c6c29a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.512ex; height:2.509ex;" alt="{\displaystyle {\mathit {pk}}=y}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>,</mo>
<mi>c</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mi>Encap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">p</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}</annotation>
</semantics>
</math></span><img src="./97dffd1729f2fde6f7db7e6801f076fa1549e189.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.236ex; height:2.843ex;" alt="{\displaystyle (k,c):=\operatorname {Encap} ({\mathit {pk}})}" loading="lazy"></span>:</li></ul>
<ol><li>Choose <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./5ea4ad964bed4bd1fa9758edecc191199a4116cc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.222ex; height:2.843ex;" alt="{\displaystyle r\in \mathbb {Z} /q\mathbb {Z} }" loading="lazy"></span> uniformly at random.</li>
<li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t:=y^{r}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
<mo>:=</mo>
<msup>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t:=y^{r}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./9a5f66c8c1333b85c59f56210db0c9e82dc31399.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.57ex; height:2.676ex;" alt="{\displaystyle t:=y^{r}{\bmod {p}}}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k:=H(t)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>:=</mo>
<mi>H</mi>
<mo stretchy="false">(</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k:=H(t)}</annotation>
</semantics>
</math></span><img src="./8896cab511686e4d43f0a759fcce668128e5bb27.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.669ex; height:2.843ex;" alt="{\displaystyle k:=H(t)}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c:=g^{r}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>:=</mo>
<msup>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c:=g^{r}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./36d8b31b9d47ae9e4e037a0659643a12b8342679.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.695ex; height:2.676ex;" alt="{\displaystyle c:=g^{r}{\bmod {p}}}" loading="lazy"></span> as its encapsulation.</li></ol>
<ul><li><b>Decapsulation</b> of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> with private key <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathit {sk}}=x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>=</mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\mathit {sk}}=x}</annotation>
</semantics>
</math></span><img src="./be6ad3ee52193b96a7fb624bafb5e84be678c236.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.449ex; height:2.176ex;" alt="{\displaystyle {\mathit {sk}}=x}" loading="lazy"></span>, giving <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>Decap</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-tex-mathit" mathvariant="italic">s</mi>
<mi class="MJX-tex-mathit" mathvariant="italic">k</mi>
</mrow>
</mrow>
<mo>,</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}</annotation>
</semantics>
</math></span><img src="./a52f9a280661946e980d640ad3546137b90b564c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.492ex; height:3.009ex;" alt="{\displaystyle k':=\operatorname {Decap} ({\mathit {sk}},c')}" loading="lazy"></span>:</li></ul>
<ol><li>Fail and return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \bot }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">⊥<!-- ⊥ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \bot }</annotation>
</semantics>
</math></span><img src="./f282c7bc331cc3bfcf1c57f1452cc23c022f58de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.808ex; height:2.176ex;" alt="{\displaystyle \bot }" loading="lazy"></span> if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (c')^{(p-1)/q}\not \equiv 1{\pmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>q</mi>
</mrow>
</msup>
<mo>≢</mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mi>p</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (c')^{(p-1)/q}\not \equiv 1{\pmod {p}}}</annotation>
</semantics>
</math></span><img src="./910fcd3d5b5153755d3c34ae097fd0a365bbe8df.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.634ex; height:3.343ex;" alt="{\displaystyle (c')^{(p-1)/q}\not \equiv 1{\pmod {p}}}" loading="lazy"></span>, i.e., if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c'}</annotation>
</semantics>
</math></span><img src="./f295e32663780aa8800e3106dba9d6e04e57cdc6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.692ex; height:2.509ex;" alt="{\displaystyle c'}" loading="lazy"></span> is not in the subgroup generated by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>g</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g}</annotation>
</semantics>
</math></span><img src="./d3556280e66fe2c0d0140df20935a6f057381d77.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}" loading="lazy"></span>.</li>
<li>Compute <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t':=(c')^{x}{\bmod {p}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>t</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mo stretchy="false">(</mo>
<msup>
<mi>c</mi>
<mo>′</mo>
</msup>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>p</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t':=(c')^{x}{\bmod {p}}}</annotation>
</semantics>
</math></span><img src="./79a304464bb8604a689c62a4eec0eb4d3553e3c4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.794ex; height:3.009ex;" alt="{\displaystyle t':=(c')^{x}{\bmod {p}}}" loading="lazy"></span>.</li>
<li>Return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k':=H(t')}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>H</mi>
<mo stretchy="false">(</mo>
<msup>
<mi>t</mi>
<mo>′</mo>
</msup>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k':=H(t')}</annotation>
</semantics>
</math></span><img src="./b7c631a3af5abf18bd803fe72eb4c4649d1fbb45.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.039ex; height:3.009ex;" alt="{\displaystyle k':=H(t')}" loading="lazy"></span>.</li></ol>
<p>When combined with an authenticated cipher to encrypt arbitrary bit string messages, the combination is essentially the <a href="Integrated_Encryption_Scheme" title="Integrated Encryption Scheme">Integrated Encryption Scheme</a>.
Since this KEM only requires a one-way key derivation function to hash random elements of the group it is defined over, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} /p\mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} /p\mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./57869a3a3c4c431cc49c4c7ab1d9c7ea692b517b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.433ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} /p\mathbb {Z} }" loading="lazy"></span> in this case, and not a reversible encoding of messages, it is easy to extend to more compact and efficient elliptic curve groups for the same security, as in the <a href="Integrated_Encryption_Scheme#Formal_description_of_ECIES" title="Integrated Encryption Scheme">ECIES, Elliptic Curve Integrated Encryption Scheme</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Key_Wrap" class="mw-redirect" title="Key Wrap">Key Wrap</a></li>
<li><a href="Optimal_Asymmetric_Encryption_Padding" class="mw-redirect" title="Optimal Asymmetric Encryption Padding">Optimal Asymmetric Encryption Padding</a></li>
<li><a href="Hybrid_cryptosystem" title="Hybrid cryptosystem">Hybrid Cryptosystem</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-galbraith2012mathpkcbook-kemdem-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-kemdem_1-9"><sup><i><b>j</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGalbraith2012" class="citation book cs1">Galbraith, Steven (2012). "§23.1.1: The KEM/DEM paradigm". <i>Mathematics of Public-Key Cryptography</i>. Cambridge University Press. pp.&nbsp;<span class="nowrap">471–</span>478. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-107-01392-6</bdi>.</cite></span>
</li>
<li id="cite_note-shoup2000hashhedgecca-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-shoup2000hashhedgecca_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-shoup2000hashhedgecca_2-9"><sup><i><b>j</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFShoup2000" class="citation conference cs1"><a href="Victor_Shoup" title="Victor Shoup">Shoup, Victor</a> (May 2000). <a href="Bart_Preneel" title="Bart Preneel">Preneel, Bart</a> (ed.). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/3-540-45539-6_19"><i>Using Hash Functions as a Hedge against Chosen Ciphertext Attack</i></a>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/3-540-45539-6">Advances in Cryptology – EUROCRYPT 2000</a>. Lecture Notes in Computer Science. Vol.&nbsp;1807. Bruges, Belgium: Springer. pp.&nbsp;<span class="nowrap">275–</span>288. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-45539-6_19">10.1007/3-540-45539-6_19</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-67517-4</bdi>.</cite></span>
</li>
<li id="cite_note-cramer-shoup2003pkecca-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-cramer-shoup2003pkecca_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-cramer-shoup2003pkecca_3-7"><sup><i><b>h</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFCramerShoup2003" class="citation journal cs1"><a href="Ronald_Cramer" title="Ronald Cramer">Cramer, Ronald</a>; <a href="Victor_Shoup" title="Victor Shoup">Shoup, Victor</a> (2003). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://epubs.siam.org/doi/10.1137/S0097539702403773">"Design and Analysis of Practical Public-Key Encryption Schemes Secure against Adaptive Chosen Ciphertext Attack"</a></span>. <i>SIAM Journal on Computing</i>. <b>33</b> (1). <a href="Society_for_Industrial_and_Applied_Mathematics" title="Society for Industrial and Applied Mathematics">Society for Industrial and Applied Mathematics</a>: <span class="nowrap">167–</span>226. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2FS0097539702403773">10.1137/S0097539702403773</a>.</cite></span>
</li>
<li id="cite_note-fips203-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-fips203_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-fips203_4-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-fips203_4-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.pdf"><i>FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard</i></a> <span class="cs1-format">(PDF)</span>, <a href="National_Institute_of_Standards_and_Technology" title="National Institute of Standards and Technology">NIST</a>, 2024-08-13, <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.6028%2FNIST.FIPS.203">10.6028/NIST.FIPS.203</a></span></cite></span>
</li>
<li id="cite_note-rfc9180-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-rfc9180_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-rfc9180_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-rfc9180_5-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-rfc9180_5-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-rfc9180_5-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-rfc9180_5-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFR._BarnesK._BhargavanB._LippC._Wood2022" class="citation cs1">R. Barnes; K. Bhargavan; B. Lipp; C. Wood (February 2022). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc9180"><i>Hybrid Public Key Encryption</i></a>. <a href="Internet_Research_Task_Force" title="Internet Research Task Force">Internet Research Task Force</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC9180">10.17487/RFC9180</a></span>. <a href="Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc9180">9180</a>.</cite> <i>Informational.</i>
</span>
</li>
<li id="cite_note-rfc8017-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-rfc8017_6-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFB._KaliskiA._RuschJ._JohnssonA._Rusch2016" class="citation cs1">B. Kaliski; A. Rusch; J. Johnsson; A. Rusch (November 2016). K. Moriarty (ed.). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc8017"><i>PKCS #1: RSA Cryptography Specifications Version 2.2</i></a>. <a href="Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC8017">10.17487/RFC8017</a></span>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/2070-1721">2070-1721</a>. <a href="Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc8017">8017</a>.</cite> <i>Informational.</i> Obsoletes RFC&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc3447">3447</a>.
</span>
</li>
<li id="cite_note-menezes-vanoorschoot-vanstone1996hac-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-menezes-vanoorschoot-vanstone1996hac_7-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMenezesvan_OorschotVanstone1996" class="citation book cs1"><a href="Alfred_Menezes" title="Alfred Menezes">Menezes, Alfred J.</a>; <a href="Paul_van_Oorschot" title="Paul van Oorschot">van Oorschot, Paul C.</a>; <a href="Scott_Vanstone" title="Scott Vanstone">Vanstone, Scott A.</a> (October 1996). <a rel="nofollow" class="external text" href="https://cacr.uwaterloo.ca/hac/about/chap8.pdf#page=2">"8. Public-Key Encryption"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://cacr.uwaterloo.ca/hac/"><i>Handbook of Applied Cryptography</i></a>. CRC Press. pp.&nbsp;<span class="nowrap">283–</span>319. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-8493-8523-7</bdi>.</cite></span>
</li>
<li id="cite_note-ferguson-kohno-schneier2010cryptoengineering-8"><span class="mw-cite-backlink">^ <a href="#cite_ref-ferguson-kohno-schneier2010cryptoengineering_8-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ferguson-kohno-schneier2010cryptoengineering_8-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFFergusonKohnoSchneier2010" class="citation book cs1"><a href="Niels_Ferguson" title="Niels Ferguson">Ferguson, Niels</a>; <a href="Tadayoshi_Kohno" title="Tadayoshi Kohno">Kohno, Tadayoshi</a>; <a href="Bruce_Schneier" title="Bruce Schneier">Schneier, Bruce</a> (2010). "12. RSA". <i>Cryptography Engineering</i>. Wiley. pp.&nbsp;<span class="nowrap">195–</span>211. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-470-47424-2</bdi>.</cite></span>
</li>
<li id="cite_note-rfc4880-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-rfc4880_9-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFJ._CallasL._DonnerhackeH._FinneyD._Shaw2007" class="citation cs1"><a href="Jon_Callas" title="Jon Callas">J. Callas</a>; L. Donnerhacke; <a href="Hal_Finney_(computer_scientist)" title="Hal Finney (computer scientist)">H. Finney</a>; D. Shaw; R. Thayer (November 2007). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc4880"><i>OpenPGP Message Format</i></a>. Network Working Group. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC4880">10.17487/RFC4880</a></span>. <a href="Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc4880">4880</a>.</cite> <i>Proposed Standard.</i> Obsoletes RFC&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc1991">1991</a> and RFC&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc2440">2440</a>. Obsoleted by RFC&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc9580">9580</a>.
</span>
</li>
<li id="cite_note-nist-pqc-faqs-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-nist-pqc-faqs_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-nist-pqc-faqs_10-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20240626090150/https://csrc.nist.gov/Projects/post-quantum-cryptography/faqs">"Post-Quantum Cryptography: FAQs"</a>. <a href="National_Institute_of_Standards_and_Technology" title="National Institute of Standards and Technology">NIST</a>. 2024-07-19. Archived from <a rel="nofollow" class="external text" href="https://csrc.nist.gov/Projects/Post-Quantum-Cryptography/faqs">the original</a> on 2024-06-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-07-20</span></span>.</cite></span>
</li>
<li id="cite_note-dent2002designerkem-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-dent2002designerkem_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-dent2002designerkem_11-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-dent2002designerkem_11-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-dent2002designerkem_11-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-dent2002designerkem_11-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFDent2002" class="citation cs2">Dent, Alexander W. (2002), <a rel="nofollow" class="external text" href="https://eprint.iacr.org/2002/174"><i>A Designer’s Guide to KEMs</i></a>, Cryptology ePrint Archive, <a href="International_Association_for_Cryptologic_Research" title="International Association for Cryptologic Research">IACR</a></cite></span>
</li>
<li id="cite_note-hofheinz-hövelmanns-kiltz2017modularfo-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-hofheinz-hövelmanns-kiltz2017modularfo_12-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHofheinzHövelmannsKiltz2017" class="citation conference cs1">Hofheinz, Dennis; Hövelmanns, Kathrin; Kiltz, Eike (November 2017). Kalai, Yael; Reyzin, Leonid (eds.). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/978-3-319-70500-2_12"><i>A Modular Analysis of the Fujisaki-Okamoto Transformation</i></a>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/978-3-319-70500-2">Theory of Cryptography – TCC 2017</a>. Lecture Notes in Computer Science. Vol.&nbsp;10677. Baltimore, MD, United States: Springer. pp.&nbsp;<span class="nowrap">341–</span>371. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-319-70500-2_12">10.1007/978-3-319-70500-2_12</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-319-70499-9</bdi>.</cite></span>
</li>
<li id="cite_note-NIST.SP.800-227-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-NIST.SP.800-227_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NIST.SP.800-227_13-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NIST.SP.800-227_13-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFAlagicBarkerChenDustin2025" class="citation cs2">Alagic, Gorjan; Barker, Elaine; Chen, Lily; Dustin, Moody; Robinson, Angela; Silberg, Hamilton; Waller, Noah (January 2025), <a rel="nofollow" class="external text" href="https://csrc.nist.gov/pubs/sp/800/227/ipd"><i>SP 800-227 ipd: Recommendations for Key-Encapsulation Mechanisms</i></a>, Initial public draft, <a href="National_Institute_of_Standards_and_Technology" title="National Institute of Standards and Technology">NIST</a>, <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.6028%2FNIST.SP.800-227.ipd">10.6028/NIST.SP.800-227.ipd</a></span></cite></span>
</li>
<li id="cite_note-Persichetti2012thesis-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-Persichetti2012thesis_14-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPersichetti2012" class="citation thesis cs1">Persichetti, Edoardo (November 2012). <a rel="nofollow" class="external text" href="https://hdl.handle.net/2292/19803"><i>Improving the Efficiency of Code-Based Cryptography</i></a>. Department of Mathematics (PhD thesis). University of Auckland.</cite></span>
</li>
<li id="cite_note-shoup2001isoproposal-15"><span class="mw-cite-backlink">^ <a href="#cite_ref-shoup2001isoproposal_15-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-shoup2001isoproposal_15-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-shoup2001isoproposal_15-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFShoup2001" class="citation cs2"><a href="Victor_Shoup" title="Victor Shoup">Shoup, Victor</a> (2001), <a rel="nofollow" class="external text" href="https://eprint.iacr.org/2001/112"><i>A Proposal for an ISO Standard for Public Key Encryption (version 2.1)</i></a>, Cryptology ePrint Archive, <a href="International_Association_for_Cryptologic_Research" title="International Association for Cryptologic Research">IACR</a></cite></span>
</li>
<li id="cite_note-rfc9690-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-rfc9690_16-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFR._HousleyS._Turner2025" class="citation cs1">R. Housley; S. Turner (February 2025). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc9690"><i>Use of the RSA-KEM Algorithm in the Cryptographic Message Syntax (CMS)</i></a>. <a href="Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC9690">10.17487/RFC9690</a></span>. <a href="Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc9690">9690</a>.</cite> <i>Proposed Standard.</i> Obsoletes RFC&nbsp;<a rel="nofollow" class="external text" href="https://www.rfc-editor.org/rfc/rfc5990">5990</a>.
</span>
</li>
<li id="cite_note-an2001pkae-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-an2001pkae_17-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFAn2001" class="citation cs2">An, Jee Hea (2001), <a rel="nofollow" class="external text" href="https://eprint.iacr.org/2001/079"><i>Authenticated Encryption in the Public-Key Setting: Security Notions and Analyses</i></a>, Cryptology ePrint Archive, <a href="International_Association_for_Cryptologic_Research" title="International Association for Cryptologic Research">IACR</a></cite></span>
</li>
<li id="cite_note-BDPR1998pkesecrelations-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-BDPR1998pkesecrelations_18-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBellareDesaiPointchevalRogaway1998" class="citation conference cs1"><a href="Mihir_Bellare" title="Mihir Bellare">Bellare, Mihir</a>; Desai, Anand; <a href="David_Pointcheval" title="David Pointcheval">Pointcheval, David</a>; <a href="Phillip_Rogaway" title="Phillip Rogaway">Rogaway, Phillip</a> (1998). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/BFb0055718">"Relations among notions of security for public-key encryption schemes"</a>. In <a href="Hugo_Krawczyk" title="Hugo Krawczyk">Krawczyk, Hugo</a> (ed.). <i>18th Annual International Cryptology Conference, Santa Barbara, California, USA, August 23–27, 1998, Proceedings</i>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/BFb0055715">Advances in Cryptology—CRYPTO '98</a>. Lecture Notes in Computer Science. Vol.&nbsp;1462. Springer. pp.&nbsp;<span class="nowrap">26–</span>45. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2FBFb0055718">10.1007/BFb0055718</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-64892-5</bdi>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0302-9743">0302-9743</a>.</cite></span>
</li>
<li id="cite_note-2018EFAIL-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-2018EFAIL_19-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPoddebniakDresenMüllerIsing2018" class="citation conference cs1">Poddebniak, Damian; Dresen, Christian; Müller, Jens; Ising, Fabian; Schinzel, Sebastian; Friedberger, Simon; Somorovsky, Juraj; Schwenk, Jörg (August 2018). <a rel="nofollow" class="external text" href="https://www.usenix.org/conference/usenixsecurity18/presentation/poddebniak">"Efail: Breaking S/MIME and OpenPGP Email Encryption using Exfiltration Channels"</a>. <i>27th USENIX Security Symposium (USENIX Security 18)</i>. USENIX Association. pp.&nbsp;<span class="nowrap">549–</span>566. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-939133-04-5</bdi>.</cite></span>
</li>
<li id="cite_note-Giacon-Hauer-Poettering2018kemcombiners-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-Giacon-Hauer-Poettering2018kemcombiners_20-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGiaconHeuerPoettering" class="citation conference cs1">Giacon, Federico; Heuer, Felix; Poettering, Bertram. <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/978-3-319-76578-5_7">"KEM Combiners"</a>. In Abdalla, Michel; Dahab, Ricardo (eds.). <i>21st IACR International Conference on Practice and Theory of Public-Key Cryptography, Rio de Janeiro, Brazil, March 25-29, 2018, Proceedings, Part I</i>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/978-3-319-76578-5">Public-Key Cryptography – PKC 2018</a>. Lecture Notes in Computer Science. Vol.&nbsp;10769. Springer. pp.&nbsp;<span class="nowrap">190–</span>218. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-319-76578-5_7">10.1007/978-3-319-76578-5_7</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-319-76578-5</bdi>.</cite></span>
</li>
<li id="cite_note-10.1007_978-3-030-25510-7-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-10.1007_978-3-030-25510-7_21-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBindelBrendelFischlinGoncalves" class="citation conference cs1">Bindel, Nina; Brendel, Jacqueline; Fischlin, Marc; Goncalves, Brian; Stebila, Douglas. <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/978-3-030-25510-7_12">"Hybrid Key Encapsulation Mechanisms and Authenticated Key Exchange"</a></span>. In Ding, Jintai; Steinwaldt, Rainer (eds.). <i>10th International Conference, PQCrypto 2019, Chongqing, China, May 8–10, 2019 Revised Selected Papers</i>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/978-3-030-25510-7">Post-Quantum Cryptography</a>. Lecture Notes in Computer Science. Vol.&nbsp;11505. Springer. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-030-25510-7">10.1007/978-3-030-25510-7</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-030-25510-7</bdi>.</cite></span>
</li>
<li id="cite_note-ETSI_TS_103_744_V1.1.1-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-ETSI_TS_103_744_V1.1.1_22-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFETSI_Technical_Committee_Cyber_Security_(CYBER)2020" class="citation cs2">ETSI Technical Committee Cyber Security (CYBER) (December 2020), <a rel="nofollow" class="external text" href="https://www.etsi.org/deliver/etsi_ts/103700_103799/103744/01.01.01_60/ts_103744v010101p.pdf"><i>Quantum-safe Hybrid Key Exchanges</i></a> <span class="cs1-format">(PDF)</span>, Technical Standards, <a href="European_Telecommunications_Standards_Institute" title="European Telecommunications Standards Institute">ETSI</a></cite></span>
</li>
<li id="cite_note-aumasson2018seriouscrypto-23"><span class="mw-cite-backlink">^ <a href="#cite_ref-aumasson2018seriouscrypto_23-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-aumasson2018seriouscrypto_23-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-aumasson2018seriouscrypto_23-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-aumasson2018seriouscrypto_23-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFAumasson2018" class="citation book cs1">Aumasson, Jean-Philippe (2018). "10. RSA". <i>Serious Cryptography: A Practical Introduction to Modern Encryption</i>. No Starch Press. pp.&nbsp;<span class="nowrap">181–</span>199. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-59327-826-7</bdi>.</cite></span>
</li>
<li id="cite_note-stinson2006cryptotheorypracticebook-24"><span class="mw-cite-backlink">^ <a href="#cite_ref-stinson2006cryptotheorypracticebook_24-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-stinson2006cryptotheorypracticebook_24-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-stinson2006cryptotheorypracticebook_24-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFStinson2006" class="citation book cs1"><a href="Doug_Stinson" title="Doug Stinson">Stinson, Douglas R.</a> (2006). "5. The RSA Cryptosystem and Factoring Integers". <i>Cryptography Theory and Practice</i> (3rd&nbsp;ed.). Chapman &amp; Hall/CRC. pp.&nbsp;<span class="nowrap">161–</span>232. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-58488-508-5</bdi>.</cite></span>
</li>
<li id="cite_note-rsa1978method-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-rsa1978method_25-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFRivestShamirAdleman1978" class="citation journal cs1"><a href="Ron_Rivest" title="Ron Rivest">Rivest, R.L.</a>; <a href="Adi_Shamir" title="Adi Shamir">Shamir, A.</a>; <a href="Leonard_Adleman" title="Leonard Adleman">Adleman, L.</a> (1978-02-01). <a rel="nofollow" class="external text" href="https://people.csail.mit.edu/rivest/Rsapaper.pdf">"A method for obtaining digital signatures and public-key cryptosystems"</a> <span class="cs1-format">(PDF)</span>. <i>Communications of the ACM</i>. <b>21</b> (2). <a href="Association_for_Computing_Machinery" title="Association for Computing Machinery">ACM</a>: <span class="nowrap">120–</span>126. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F359340.359342">10.1145/359340.359342</a></span>.</cite></span>
</li>
<li id="cite_note-svenda2016mkq-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-svenda2016mkq_26-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFŠvendaNemecSekanKvašňovský2016" class="citation conference cs1">Švenda, Petr; Nemec, Matúš; Sekan, Peter; Kvašňovský, Rudolf; Formánek, David; Komárek, David; Matyáš, Vashek (August 2016). <a rel="nofollow" class="external text" href="https://www.usenix.org/conference/usenixsecurity16/technical-sessions/presentation/svenda"><i>The Million-Key Question—Investigating the Origins of RSA Public Keys</i></a>. 25th USENIX Security Symposium. Austin, TX, United States: USENIX Association. pp.&nbsp;<span class="nowrap">893–</span>910. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-931971-32-4</bdi>.</cite></span>
</li>
<li id="cite_note-bleichenbacher1998pkcs1cca-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-bleichenbacher1998pkcs1cca_27-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBleichenbacher1998" class="citation conference cs1"><a href="Daniel_Bleichenbacher" title="Daniel Bleichenbacher">Bleichenbacher, Daniel</a> (August 1998). <a href="Hugo_Krawczyk" title="Hugo Krawczyk">Krawczyk, Hugo</a> (ed.). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/BFb0055716"><i>Chosen ciphertext attacks against protocols based on the RSA encryption standard PKCS #1</i></a>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/BFb0055715">Advances in Cryptology – CRYPTO '98</a>. Lecture Notes in Computer Science. Vol.&nbsp;1462. Santa Barbara, CA, United States: Springer. pp.&nbsp;<span class="nowrap">1–</span>12. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2FBFb0055716">10.1007/BFb0055716</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-64892-5</bdi>.</cite></span>
</li>
<li id="cite_note-coron-joye-naccache-paillier2000newpkcs1attacks-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-coron-joye-naccache-paillier2000newpkcs1attacks_28-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFCoronJoyeNaccachePaillier2000" class="citation conference cs1">Coron, Jean-Sébastien; Joye, Marc; <a href="David_Naccache" title="David Naccache">Naccache, David</a>; Paillier, Pascal (May 2000). <a href="Bart_Preneel" title="Bart Preneel">Preneel, Bart</a> (ed.). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/3-540-45539-6_25"><i>New Attacks on PKCS#1 v1.5 Encryption</i></a>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/3-540-45539-6">Advances in Cryptology – EUROCRYPT 2000</a>. Lecture Notes in Computer Science. Vol.&nbsp;1807. Bruges, Belgium: Springer. pp.&nbsp;<span class="nowrap">369–</span>381. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-45539-6_25">10.1007/3-540-45539-6_25</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-67517-4</bdi>.</cite></span>
</li>
<li id="cite_note-galbraith2012mathpkcbook-elgamal-29"><span class="mw-cite-backlink">^ <a href="#cite_ref-galbraith2012mathpkcbook-elgamal_29-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-galbraith2012mathpkcbook-elgamal_29-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGalbraith2012" class="citation book cs1">Galbraith, Steven (2012). "§20.3: Textbook Elgamal encryption". <i>Mathematics of Public-Key Cryptography</i>. Cambridge University Press. pp.&nbsp;<span class="nowrap">471–</span>478. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-107-01392-6</bdi>.</cite></span>
</li>
<li id="cite_note-elgamal1985pke-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-elgamal1985pke_30-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFElgamal1984" class="citation conference cs1"><a href="Taher_Elgamal" title="Taher Elgamal">Elgamal, Taher</a> (August 1984). <a href="George_Blakley" title="George Blakley">Blakley, George Robert</a>; <a href="David_Chaum" title="David Chaum">Chaum, David</a> (eds.). <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/3-540-39568-7_2"><i>A Public Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms</i></a>. <a rel="nofollow" class="external text" href="https://link.springer.com/book/10.1007/3-540-39568-7">Advances in Cryptology – CRYPTO 1984</a>. Lecture Notes in Computer Science. Vol.&nbsp;196. Santa Barbara, CA, United States: Springer. pp.&nbsp;<span class="nowrap">10–</span>18. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-39568-7_2">10.1007/3-540-39568-7_2</a></span>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-15658-1</bdi>.</cite></span>
</li>
<li id="cite_note-koblitz1987ecc-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-koblitz1987ecc_31-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKoblitz1987" class="citation journal cs1"><a href="Neal_Koblitz" title="Neal Koblitz">Koblitz, Neal</a> (January 1987). <a rel="nofollow" class="external text" href="https://www.ams.org/journals/mcom/1987-48-177/S0025-5718-1987-0866109-5/S0025-5718-1987-0866109-5.pdf">"Elliptic Curve Cryptosystems"</a> <span class="cs1-format">(PDF)</span>. <i>Mathematics of Computation</i>. <b>48</b> (177). <a href="American_Mathematical_Society" title="American Mathematical Society">American Mathematical Society</a>: <span class="nowrap">203–</span>209. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1090%2FS0025-5718-1987-0866109-5">10.1090/S0025-5718-1987-0866109-5</a></span>.</cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-08" href="https://en.wikipedia.org/wiki/?title=Key_encapsulation_mechanism&amp;oldid=1304798084">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>